#include <iostream>
using namespace std;

class Array {
  public:
    Array(int a[], int iSize) : elem(a), size(iSize) {}

    int GetSize() { return size; }

    int &operator[](int i) { return elem[i - 1]; }

  private:
    int *elem;
    int size;
};

int main() {
    int s[] = {3, 7, 2, 1, 5};
    Array ar(s, 5);
    ar[1] = 9;
    for (int i = 1; i <= 5; i++) {
        cout << ar[i] << "  ";
    }
    cout << endl;

    return 0;
}
